package observer;

/**
 * @Author: linKe
 * @Date: 2022/1/15 14:13
 * @FileName: DogObserver
 * @version: 1.0
 * @Description: 小狗观察者
 */
public class DogObserver implements Observer {

    public DogObserver(Subject subject) {
        subject.registryObserver(this);
    }

    @Override
    public void update(String news) {
        System.out.println("汪汪，" + news);
    }

}

